package cn.codergege.shiro.chapter6.dao;

import java.util.Set;

import cn.codergege.shiro.chapter6.model.User;

public interface UserDao {
    public User createUser(User user) throws Exception;
    public void updateUser(User user) throws Exception;
    public void deleteUser(Long userId) throws Exception;

    public void correlationRoles(Long userId, Long... roleIds) throws Exception;
    public void uncorrelationRoles(Long userId, Long... roleIds) throws Exception;

    User findOne(Long userId);

    User findByUsername(String username);

    Set<String> findRoles(String username);

    Set<String> findPermissions(String username);
}
